﻿@model MLManagement.Models.Customer
@{
    ViewBag.Title = "Crear cliente";
    if (ViewBag.AreCustomersSelectable == false)
    {
        ViewBag.BtnValue = "value=\"Crear\"";
    }
    else
    {
        ViewBag.BtnValue = "value=\"Crear y seleccionar\"";
    }
}
<div class="well">
    <h3>
        <p class="muted">
            Crear Cliente</p>
    </h3>
</div>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <p class="muted">
            Agregue los datos del nuevo cliente, y luego presione el botón Crear</p>
        <hr />
        <div class="editor-label">
            @Html.LabelFor(model => model.MlUser)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MlUser)
            @Html.ValidationMessageFor(model => model.MlUser)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Phone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Phone)
            @Html.ValidationMessageFor(model => model.Phone)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.MobilePhone)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MobilePhone)
            @Html.ValidationMessageFor(model => model.MobilePhone)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Locality)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Locality)
            @Html.ValidationMessageFor(model => model.Locality)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Province)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Province)
            @Html.ValidationMessageFor(model => model.Province)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Country)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Country)
            @Html.ValidationMessageFor(model => model.Country)
        </div>
        <p>
            <input type="submit" name="submit" class="btn btn-success" @Html.Raw(ViewBag.BtnValue) />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Volver", "Index")
</div>
